package com.javasm.adminapi.module.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.javasm.adminapi.module.system.dto.MenuAndUrl;
import com.javasm.adminapi.module.system.entity.SysPermission;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 系统权限表(SysPermission)表数据库访问层
 *
 * @author makejava
 * @since 2025-10-20 15:36:10
 */
public interface SysPermissionDao extends BaseMapper<SysPermission> {

    @Select("SELECT p.permission_url as menu,s.url as url from permission " +
            "as p,sys_menu_permission as sp,sys_permission s WHERE p.id=sp.menu_id and s.id=sp.permission_id and s.type!=-1")
    List<MenuAndUrl> menuAndUrl();
}

